package com.csi.okr.mobile.common.entity;

import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * 
 */
@Embeddable
public class TOkrValveId implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	
	private BigDecimal OMaxNo;
	private BigDecimal krMaxNo;

	public TOkrValveId() {
	}

	public TOkrValveId(BigDecimal OMaxNo, BigDecimal krMaxNo) {
		this.OMaxNo = OMaxNo;
		this.krMaxNo = krMaxNo;
	}

	@Column(name = "O_MAX_NO", precision = 22, scale = 0)
	public BigDecimal getOMaxNo() {
		return this.OMaxNo;
	}

	public void setOMaxNo(BigDecimal OMaxNo) {
		this.OMaxNo = OMaxNo;
	}

	@Column(name = "KR_MAX_NO", precision = 22, scale = 0)
	public BigDecimal getKrMaxNo() {
		return this.krMaxNo;
	}

	public void setKrMaxNo(BigDecimal krMaxNo) {
		this.krMaxNo = krMaxNo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TOkrValveId))
			return false;
		TOkrValveId castOther = (TOkrValveId) other;

		return ((this.getOMaxNo() == castOther.getOMaxNo()) || (this.getOMaxNo() != null
				&& castOther.getOMaxNo() != null && this.getOMaxNo().equals(castOther.getOMaxNo())))
				&& ((this.getKrMaxNo() == castOther.getKrMaxNo()) || (this.getKrMaxNo() != null
						&& castOther.getKrMaxNo() != null && this.getKrMaxNo().equals(castOther.getKrMaxNo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getOMaxNo() == null ? 0 : this.getOMaxNo().hashCode());
		result = 37 * result + (getKrMaxNo() == null ? 0 : this.getKrMaxNo().hashCode());
		return result;
	}

}
